home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / Task.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  2KB  |  132 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // Task.h
  5. //
  6. // API for the package Task.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header: /flux/packages/Task.h 8     7/08/01 15:06 Will $
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(Task);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "task" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24.  
  25. #else
  26.  
  27. //
  28. // htask Cast( hobject o )
  29. //
  30. // Return the value of o if it is a valid task, or none if it isn't.
  31. //
  32. prototype htask Task.Cast( hobject o );
  33.  
  34. //
  35. // htask Current()
  36. //
  37. // Return the handle of the current task
  38. //
  39. prototype htask Task.Current();
  40.  
  41. //
  42. // Suspend( htask t )
  43. //
  44. // Suspend the given task.
  45. //
  46. prototype Task.Suspend( htask t );
  47.  
  48. //
  49. // Resume( htask t )
  50. //
  51. // Allow the given task to resume execution.
  52. //
  53. prototype Task.Resume( htask t );
  54.  
  55. //
  56. // SuspendAll()
  57. //
  58. // Suspend all tasks.
  59. //
  60. prototype Task.SuspendAll();
  61.  
  62. //
  63. // ResumeAll()
  64. //
  65. // Allow all tasks to resume execution.
  66. //
  67. prototype Task.ResumeAll();
  68.  
  69. //
  70. // Halt( htask t )
  71. //
  72. // Permanently halt the given task.
  73. //
  74. prototype Task.Halt( htask t );
  75.  
  76. //
  77. // Sleep( htask t, float secs )
  78. //
  79. // Suspend the given task for the given time.
  80. //
  81. prototype Task.Sleep( htask t, float secs );
  82.  
  83. //
  84. // Detach( htask t )
  85. //
  86. // Detach a child task from its parent and promote it to the top level.
  87. //
  88. prototype Task.Detach( htask t );
  89.  
  90. //
  91. // bool IsRunning( htask task )
  92. //
  93. // Return true if the given task is running, false if not or if it does not
  94. // exist.
  95. //
  96. prototype bool Task.IsRunning( htask t );
  97.  
  98. //
  99. // bool IsHalted( htask task )
  100. //
  101. // Return true if the given task is halted, false if not or if it does not
  102. // exist.
  103. //
  104. prototype bool Task.IsHalted( htask t );
  105.  
  106. //
  107. // bool IsSuspended( htask task )
  108. //
  109. // Return true if the given task is suspended, false if not or if it does not
  110. // exist.
  111. //
  112. prototype bool Task.IsSuspended( htask t );
  113.  
  114. //
  115. // htask Start( string function );
  116. //
  117. // Start a specified task function. The function must take no arguments and
  118. // return no value.
  119. //
  120. prototype htask Task.Start( string function );
  121.  
  122. //
  123. // Call( string function );
  124. //
  125. // Call a specified function. The function must take no arguments and return
  126. // no value.
  127. //
  128. prototype bool Task.Call( string function );
  129.  
  130.  
  131. #endif // FLUX_LIB
  132.